import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:series_play/comm/base/base_state.dart';
import 'package:series_play/comm/dialog_helper.dart';
import 'package:series_play/generated/assets.dart';
import 'package:series_play/widget/app_color.dart';
import 'package:series_play/widget/app_text.dart';
import 'package:series_play/widget/video/controller/base_feed_video_controller.dart';
import 'package:series_play/widget/video/video_expandable_text.dart';

import 'app_video_count_view.dart';

class AppVideoInfoPanel extends StatefulWidget {
  const AppVideoInfoPanel(this.tag, {super.key});

  final String tag;

  @override
  State<AppVideoInfoPanel> createState() => _AppVideoInfoPanelState();
}

class _AppVideoInfoPanelState extends State<AppVideoInfoPanel> {
  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        Positioned(
          right: 16.w,
          bottom: 110.w,
          child: Column(
            children: [
              AppVideoCountView(src: Assets.imagesIcVideoTv, count: '100k'),
              30.verticalSpace,
              AppVideoCountView(
                src: Assets.imagesIcVideoLoveNormal,
                count: '10.9k',
              ),
              30.verticalSpace,
              AppVideoCountView(src: Assets.imagesIcVideoSeries, count: '选集'),
            ],
          ),
        ),

        Positioned(
          left: 16.w,
          right: 16.w,
          bottom: 12.w,
          child: Column(
            mainAxisSize: MainAxisSize.min,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Padding(
                padding: const EdgeInsets.only(right: 70).w,
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    AppText.videoShadowTitle('金銮殿上的念母恩', color: AppColor.white),
                    15.verticalSpace,
                    AppText.videoShadowSecondary(
                      '第1集/共100集',
                      color: AppColor.white_60,
                    ),
                    17.verticalSpace,
                    Row(
                      children: [
                        Expanded(child: VideoExpandableText(
                          text: '于小孩，小皇子长大成人，登基为帝，为了报答当年于小孩，小皇子长大成人，登基为帝，为了报答当年于小孩，小皇子长大成人，登基为帝，为了报答当年',
                        ))
                      ],
                    ),
                  ],
                ),
              ),
              16.verticalSpace,
              GestureDetector(
                onTap: (){
                  DialogHelper.showDramaInfoSheetDialog(context);
                },
                child: Container(
                  height: 36.w,
                  decoration: BoxDecoration(
                    color: const Color(0xFF393D45),
                    borderRadius: BorderRadius.circular(6).r,
                  ),
                  alignment: Alignment.center,
                  child: AppText('查看全集', fontSize: 14, color: Colors.white , ),
                ),
              ),
            ],
          ),
        ),
      ],
    );
  }
}
